<?php

namespace app\controller;

use think\facade\View;

class Test1 extends Base
{

    public function index(){
        $arr=[['id'=>52,'sex'=>33,'name'=>'abc'],['id'=>44,'sex'=>33,'name'=>'sdf'],['id'=>22,'sex'=>33,'name'=>'xxx'],['id'=>55,'sex'=>33,'name'=>'tt']];
        View::assign('name','李');
        View::assign('fruitList',$arr);
        //$this->fetch();

        return View::fetch('index');
    }

    public function user(){
        $arr=[['id'=>52,'sex'=>33,'name'=>'abc'],['id'=>44,'sex'=>33,'name'=>'sdf'],['id'=>22,'sex'=>33,'name'=>'xxx'],['id'=>55,'sex'=>33,'name'=>'tt']];
        View::assign('name','李');
        View::assign('fruitList',$arr);
        //$this->fetch();
        //$this->fetch();
        return View::fetch('user');

    }
    public function appRedis(){
        $redis = app('redis');
        $redis->set('1','哦特合格');
    }

    public function appGetRedis(){
        $redis = app('redis');
        out($redis->get('1'));
    }


}